﻿<%@ Page Title="bewerk Bandsperfestival" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Bandsperfestival.aspx.cs" Inherits="WebApplication2.EditPages.Bandsperfestival" %>

<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1><%: Title %>.</h1>
                <h2>Groep16 - Festivalinfo</h2>
            </hgroup>
            <p>
                Hier kan je de gegevens van de tabel Bandsperfestival bewerken.
            </p>
        </div>
    </section>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="fest_id,band_id,datum" DataSourceID="SqlDataSource1" AutoGenerateEditButton="True" AutoGenerateDeleteButton="True" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating">
        <Columns>
            <asp:BoundField DataField="fest_id" HeaderText="festId" ReadOnly="True" SortExpression="fest_id" />
            <asp:BoundField DataField="band_id" HeaderText="bandId" ReadOnly="True" SortExpression="band_id" />
            <asp:BoundField DataField="pod_id" HeaderText="podId" SortExpression="pod_id" />
            <asp:BoundField DataField="datum" HeaderText="datum" ReadOnly="True" SortExpression="datum" />
            <asp:BoundField DataField="uur" HeaderText="uur" SortExpression="uur" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:groep16_festivalsConnectionString %>" SelectCommand="SELECT * FROM [bandsperfestival]" DeleteCommand="DELETE FROM [bandsperfestival] WHERE [fest_id] = @fest_id AND [band_id] = @band_id AND [datum] = @datum" InsertCommand="INSERT INTO [bandsperfestival] ([fest_id], [band_id], [pod_id], [datum], [uur]) VALUES (@fest_id, @band_id, @pod_id, @datum, @uur)" UpdateCommand="UPDATE [bandsperfestival] SET [pod_id] = @pod_id, [uur] = @uur WHERE [fest_id] = @fest_id AND [band_id] = @band_id AND [datum] = @datum">
        <DeleteParameters>
            <asp:Parameter Name="fest_id" Type="Int32" />
            <asp:Parameter Name="band_id" Type="Int32" />
            <asp:Parameter DbType="Date" Name="datum" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="fest_id" Type="Int32" />
            <asp:Parameter Name="band_id" Type="Int32" />
            <asp:Parameter Name="pod_id" Type="Int32" />
            <asp:Parameter DbType="Date" Name="datum" />
            <asp:Parameter DbType="Time" Name="uur" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="pod_id" Type="Int32" />
            <asp:Parameter DbType="Time" Name="uur" />
            <asp:Parameter Name="fest_id" Type="Int32" />
            <asp:Parameter Name="band_id" Type="Int32" />
            <asp:Parameter DbType="Date" Name="datum" />
        </UpdateParameters>
</asp:SqlDataSource>
</asp:Content>